<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="/oa/Public/css/nav.css" />
<script type="text/javascript" src="/oa/Public/js/jquery.js"></script>
<style type="text/css">
a{text-decoration: none; color:#333333;outline: none;}
a:active {outline: none; star:expression(this.onFocus=this.blur());}
</style>
</head>
<body>
    <div class="title_menu">
    	<ul>
    	<?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><a href="javascript:void(0)" param="<?php echo ($i); ?>" onClick="select_job(this,<?php echo ($vo["menu_id"]); ?>)"><?php echo ($vo["menu_name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
    </div>
    <?php if( !empty($list) ){ ?>
    <?php if(is_array($list)): foreach($list as $k=>$vo): ?><div class="title_block" id="main4">
    	<?php if(is_array($vo)): foreach($vo as $k1=>$vo1): ?><div class="fang">
        	<div class="fang_top" param="<?php echo ($k+1); ?>" id="nav_<?php echo ($k+1); ?>_<?php echo ($k1); ?>" onClick="select_category(this,<?php echo ($vo1["menu_id"]); ?>)">
            	<div class="fang_top_l"><?php echo ($vo1["menu_name"]); ?></div>
            </div>
        </div><?php endforeach; endif; ?>
    </div><?php endforeach; endif; ?>
    <?php } ?>
<script type="text/javascript">
	$(document).ready(function(e) {
		$("#nav_1_0").css('display','inherit');
        select_job($('.title_menu').find('a').eq(0));//默认选中第一个
		//select_category($('.fang_top').eq(0));//默认选中第一个
		//select_now($('.title_last').find('a').eq(0));//默认选中第一个
    });
	
	function select_job(msg,id){
		var param=$(msg).attr('param');
		
		select_category($('.fang_top').eq(0));//初始化
		//select_now($('.title_last').find('a').eq(0));//初始化
		
		
		$('.title_menu li').css('border-bottom','');//清空
		$('.title_menu li').css('background-color','');//清空
		$('.title_menu li').css('font-weight','');//清空
		$('.title_block').css('display','none');
		$('.title_block').eq(param-1).css('display','inherit');
		$(msg).parent().css('border-bottom','solid 1px #333');
		$(msg).parent().css('background-color','#ccc');
		$(msg).parent().css('font-weight','900');

		window.parent.lists.location="/oa/index.php/Public/lists?id="+id;
	}
	
	function select_category(msg,id){
		//select_now($('.title_last').find('a').eq(0));//初始化
		
		//初始化效果
		$('.fang_top').css('background-color','#F2F2F2');
		
		$(msg).next().css('display','inherit');	
		$(msg).css('background-color','#ccc');
		//$(msg).css('font-weight','900');
		$(msg).children().eq(1).css('border-top','4px solid transparent');
		$(msg).children().eq(1).css('border-bottom','4px solid #FFF');
		$(msg).children().eq(1).css('margin-top','16px');
		window.parent.lists.location="/oa/index.php/Public/lists?id="+id;
	}
	
	function select_now(msg){
		$('.title_last').find('a').css('color','#000');
		$(msg).css('color','#F33');	
	}
</script>  
</body>
</html>